package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FavorableMapper;
import com.ruoyi.system.domain.Favorable;
import com.ruoyi.system.service.IFavorableService;

/**
 * favorableService业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-16
 */
@Service
public class FavorableServiceImpl implements IFavorableService 
{
    @Autowired
    private FavorableMapper favorableMapper;

    /**
     * 查询favorable
     * 
     * @param id favorable主键
     * @return favorable
     */
    @Override
    public Favorable selectFavorableById(Long id)
    {
        return favorableMapper.selectFavorableById(id);
    }

    /**
     * 查询favorable列表
     * 
     * @param favorable favorable
     * @return favorable
     */
    @Override
    public List<Favorable> selectFavorableList(Favorable favorable)
    {
        return favorableMapper.selectFavorableList(favorable);
    }

    /**
     * 新增favorable
     * 
     * @param favorable favorable
     * @return 结果
     */
    @Override
    public int insertFavorable(Favorable favorable)
    {
        return favorableMapper.insertFavorable(favorable);
    }

    /**
     * 修改favorable
     * 
     * @param favorable favorable
     * @return 结果
     */
    @Override
    public int updateFavorable(Favorable favorable)
    {
        return favorableMapper.updateFavorable(favorable);
    }

    /**
     * 批量删除favorable
     * 
     * @param ids 需要删除的favorable主键
     * @return 结果
     */
    @Override
    public int deleteFavorableByIds(Long[] ids)
    {
        return favorableMapper.deleteFavorableByIds(ids);
    }

    /**
     * 删除favorable信息
     * 
     * @param id favorable主键
     * @return 结果
     */
    @Override
    public int deleteFavorableById(Long id)
    {
        return favorableMapper.deleteFavorableById(id);
    }
}
